import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHistory('/'),  // 使用固定的根路径
    strict: true,
    routes: [{
        path: '/',
        name: 'home', // 主页也是x.api
        component: HomeView    //作为组件导入
    },
    {
        path: '/Docment',
        name: 'Docment', //需求模版页面路由
        component: () =>
            import('../views/DocmentView.vue')
      },
      {
        path: '/DocmentGenrate',
        name: 'DocmentGenrate', // 文档编码生成页面
        component: () =>
          import('../views/DocumentGenerateView.vue')
      },
    {
        path: '/xai',
        name: 'xai', // 主页也是x.api
        component: () =>
            import('../views/XaiView.vue')
      },
    
      {
        path: '/deepseek',
        name: 'deepseek', // 主页也是x.api
        component: () =>
          import('../views/deepSeekView.vue')
      },
    {
        path: '/chatgpt', // GPTAI页面路由
        name: 'chatgpt',
        component: () =>
            import('../views/ChatView.vue')
    },
    {
        path: '/xunfei',//讯飞页面路由
        name: 'xunfei',
        component: () =>
            import('../views/XunfeiView.vue')
    },
    {
        path: '/gmini',//Gmini页面路由
        name: 'gmini',
        component: () =>
            import('../views/GminiView.vue')
    },

    {
        path: '/ernie',//ERNIE页面路由
        name: 'ernie',
        component: () =>
            import('../views/ErnieView.vue')
    },
    {
        path: '/qwen',//Qwen页面路由
        name: 'qwen',
        component: () =>
            import('../views/QwenView.vue')
    },
    {
        path: '/about',//关于页面路由
        name: 'about',
        component: () =>
            import('../views/AboutView.vue')
    },
    {
        path: '/:pathMatch(.*)*',//其他重定向路由
        redirect: '/'
    }
    ]
})

export default router